package com.foreknow.demo7;

/**
 * 调用UserManager中的方法
 *
 */
public class Test {
    public static void main(String[] args) {

        UserManager manager = new UserManager();
        User user = new User();
        user.setId("1001");
        user.setName("tom");
        user.setAge(30);
        user.setSex(true);
        user.setHobby("music");

        User user1 = new User();
        user1.setId("1002");
        user1.setName("tom2");
        user1.setAge(32);
        user1.setSex(false);
        user1.setHobby("rock");

        manager.add(user);
        manager.add(user1);

         manager.getQueryById("111");

        User u = manager.getQueryById("1002");
        if(u != null) {
            System.out.println(u.getId()+"--"+u.getName());
        }

        User b = manager.a(user);
        if(b != null) {
            System.out.println(user.isSex());
        }
    }
}
